/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entities;

/**
 *
 * @author chocoseb
 */
public class CategorySummary {
    private Categorie _categorie;
    private double _incomes = 0.0;
    private double _expenses = 0.0;
    private double _average = 0.0;

    public CategorySummary(Categorie _categorie) {
        this._categorie = _categorie;
    }

    public Categorie getCategorie() {
        return _categorie;
    }

    public void setCategorie(Categorie _categorie) {
        this._categorie = _categorie;
    }

    public void addIncome(double amount) {
        _incomes += amount;
    }

    public void addExpenses(double amount) {
        _expenses += amount;
    }

    public double getExpenses() {
        return _expenses;
    }

    public double getIncomes() {
        return _incomes;
    }

    public double getAverage() {
        return _average;
    }

    public double getDifferenceFromAverage(){
        return getBalance() - getAverage();
    }

    public double getBalance(){
        return _incomes + _expenses;
    }

}
